package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 销售单对象 sales_orders
 *
 * @author ruoyi
 */
@Data
public class SalesOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 销售单ID */
    private Long salesOrderId;

    /** 销售单号 */
    private String number;

    /** 客户ID */
    @Excel(name = "客户ID")
    private Long customerId;

    private String phone;

    /** 联系人 */
    private String contactPerson;

    /** 客户名称 */
    @Excel(name = "客户名称")
    private String customerName;

    /** 下单日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderDate;

    /** 交货日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "交货日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deliveryDate;

    /** 总金额 */
    @Excel(name = "总金额")
    private BigDecimal totalAmount;

    /** 产品总数量 */
    @Excel(name = "产品总数量")
    private Integer productAmount;

    /** 备注 */
    private String notes;

    /** 进度模板ID */
    private Long templateId;

    /** 当前节点ID */
    private Long nodeId;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 地址 */
    @Excel(name = "地址")
    private String address;

    /** 创建者ID */
    private Long createdBy;

    // 省略getter/setter方法...
    // 请使用IDE自动生成getter/setter方法

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("salesOrderId", getSalesOrderId())
            .append("customerId", getCustomerId())
            .append("orderDate", getOrderDate())
            .append("deliveryDate", getDeliveryDate())
            .append("totalAmount", getTotalAmount())
            .append("productAmount", getProductAmount())
            .append("notes", getNotes())
            .append("templateId", getTemplateId())
            .append("nodeId", getNodeId())
            .append("status", getStatus())
            .append("address", getAddress())
            .append("createdBy", getCreatedBy())
            .toString();
    }
}
